package com.keba.otp.core;
/**
 * User bean
 * @author bejmuller
 *
 */
public class User {
	private String name;
	private String nameHash;
	private String passw;
	private byte[] key;
	private String otp;
	private String otpCreateDate;
	private String sessionKey;
	private String lastAccessDate;
	
	/**
	 * User konstruktor
	 * @param name User nev
	 * @param passw User jelszo
	 * @param key User kulcs
	 */
	public User (String name, String nameHash, String passw, byte[] key) {
		this.name = name;
		this.nameHash = nameHash;
		this.passw = passw;
		this.key = key;
		this.otp = null;
		this.otpCreateDate = null;
		this.sessionKey = null;
		this.lastAccessDate = null;
	}

	/**
	 * User konstruktor
	 * @param name User nev
	 * @param nameHash User nev hash
	 * @param passw User jelszo
	 * @param key User kulcs
	 * @param otp User OTP
	 * @param otpCreateDate User OTP generalasanak a datuma es ideje
	 * @param sessionKey Userhez tartozo session kulcs
	 * @param lastAccessDate User utolso muveletenek (login, generate) datuma es ideje
	 */
	public User (String name, String nameHash, String passw, byte[] key, String otp, String otpCreateDate, 
			String sessionKey, String lastAccessDate) {
		this.name = name;
		this.nameHash = nameHash;
		this.passw = passw;
		this.key = key;
		this.otp = otp;
		this.otpCreateDate = otpCreateDate;
		this.sessionKey = sessionKey;
		this.lastAccessDate = lastAccessDate;
	}
	
	public String getName() {
		return name;
	}

	public String getNameHash() {
		return nameHash;
	}
	
	public String getPassw() {
		return passw;
	}
	
	public void setPassw(String passw) {
		this.passw = passw;
	}

	public byte[] getKey() {
		return key;
	}

	public void setOtp(String otp) {
		this.otp = otp;
	}

	public String getOtp() {
		return otp;
	}

	public String getOtpCreateDate() {
		return this.otpCreateDate;
	}
	public void setOtpCreateDate(String date) {
		this.otpCreateDate = date;
	}
	public void setSessionKey(String sessionKey) {
		this.sessionKey = sessionKey;
	}

	public String getSessionKey() {
		return sessionKey;
	}

	public void setLastAccessDate(String date) {
		this.lastAccessDate = date;
	}
	
	public String getLastAccessDate() {
		return lastAccessDate;
	}
	
	
	
}
